package com.gxa.weixing.portal.service;

import com.gxa.weixing.core.exception.BusinessException;
import com.gxa.weixing.core.pojo.GetGoodsFromCartVO;
import com.gxa.weixing.core.pojo.Order;
import com.gxa.weixing.core.pojo.OrderGoodsVO;
import com.gxa.weixing.core.service.BaseService;

import java.util.List;
import java.util.Map;


/**
 * @Author HHT
 * 2022/1/6
 */
public interface OrderService extends BaseService<Order> {

    /**
     * 获取用户订单
     * @param id 用户编号
     * @param status 订单状态
     * @return
     */
    List<Map<String,Object>> getOrder(Long id,Integer status);

    /**
     * 获取订单详情
     * @param id 订单编号
     * @return
     */
    List<Map<String, Object>> getOrderDetail(Long id);


    /**
     * 结算
     * @param
     * @return
     */
    List<GetGoodsFromCartVO> settlement(List list, Double price, Long userId);

    /**
     * 提交订单,这里暂时考虑让前端传商品id，用户id，和商品的数量
     */
     Order SubmitOrder(Order order) throws BusinessException;


}
